function setUserCoordinates(forceCheck) {
    try {
		var latitude = $.cookie('CurrentLatitude');
		var longitude = $.cookie('CurrentLongitude');

		var setCookie = latitude == null || longitude == null || latitude == '' || longitude == '' || forceCheck;
		
		if (navigator.geolocation && setCookie) {
			navigator.geolocation.getCurrentPosition(
				function (position) {
					$.cookie('CurrentLatitude', position.coords.latitude);
					$.cookie('CurrentLongitude', position.coords.longitude);
					window.location.href = '/nearbycommunities.html';
				},
				function (error) {
					switch (error.code) {
						case error.TIMEOUT:
							//alert ('Timeout');
							break;
						case error.POSITION_UNAVAILABLE:
							//alert ('Position unavailable');
							break;
						case error.PERMISSION_DENIED:
							//alert ('Permission denied');
							break;
						case error.UNKNOWN_ERROR:
							//alert ('Unknown error');
							break;
					}
					window.location.href = '/nearbycommunities.html';
				}
				);
		} else {
			window.location.href = '/nearbycommunities.html';
		}
	} catch (ex) { 
		window.location.href = '/nearbycommunities.html';
	}


    return true;
}
